import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import '../plug/wlist.dart';
import './category.dart';
import 'package:hairen_app/pages/plug/drawer.dart';
class CatePage extends StatefulWidget {
  @override
  State<StatefulWidget> createState() => new CatePageState();
}

class CatePageState extends State<CatePage> {
  @override
  Widget build(BuildContext context) {
    return new Scaffold(
        backgroundColor: Color.fromRGBO(234, 234, 234, 1.0),
        appBar: new AppBar(
          backgroundColor: Color.fromRGBO(251, 114, 153, 1.0),
          title: new Align(
            alignment: Alignment.center,
            child: new Text(
              '分类',
              style: new TextStyle(
                color: Colors.white,
              ),
            ),
          ),
          actions: [
//            new IconButton(
//                icon: new Icon(
//                  Icons.file_download,
//                  color: Colors.white,
//                ),
//                onPressed: null),
//            new IconButton(
//                icon: new Icon(
//                  Icons.sms,
//                  color: Colors.white,
//                ),
//                onPressed: null)
          ],
//          leading: new FlatButton(
//              onPressed: (){
//                print(Scaffold.of(context));
//                Scaffold.of(context).openDrawer();
//                Scaffold.of(context).openDrawer();
//              },
//              child: new Icon(
//                Icons.menu,
//                color: Colors.white,
//              )),
        ),

        body: new Column(
          children: <Widget>[
            new WlistPage(
              children: <Widget>[
                new Expanded(
                    flex: 1,
                    child: new Container(
                      margin: EdgeInsets.only(top: 15.0),
                      child: new Align(
                        child: new InkWell(
                          child: new Column(
                            children: <Widget>[
                              new Image.asset(
                                'assets/cate/dy.png',
                                width: 30.0,
                              ),
                              new Text('电影')
                            ],
                          ),
                          onTap: () {
                            Navigator.of(context).push(
                                new CupertinoPageRoute(builder: (context)=>new CategoryPage(cateName:'电影'))
                            );
                          },
                        ),
                      ),
                    )),
                new Expanded(
                    flex: 1,
                    child: new Container(
                      margin: EdgeInsets.only(top: 15.0),
                      child: new Align(
                        child: new InkWell(
                          enableFeedback:false,
                          child: new Column(
                            children: <Widget>[
                              new Image.asset(
                                'assets/cate/ds.png',
                                width: 30.0,
                              ),
                              new Text('电视剧')
                            ],
                          ),
                          onTap: () {
                            Navigator.of(context).push(
                              new CupertinoPageRoute(builder: (context)=>new CategoryPage(cateName:'电视剧'))
                            );
                          },
                        ),
                      ),
                    )),
                new Expanded(
                    flex: 1,
                    child: new Container(
                      margin: EdgeInsets.only(top: 15.0),
                      child: new Align(
                        child: new InkWell(
                          child: new Column(
                            children: <Widget>[
                              new Image.asset(
                                'assets/cate/yl.png',
                                width: 30.0,
                              ),
                              new Text('综艺')
                            ],
                          ),
                          onTap: () {
                            Navigator.of(context).push(
                                new CupertinoPageRoute(builder: (context)=>new CategoryPage(cateName:'综艺'))
                            );
                          },
                        ),
                      ),
                    )),
                new Expanded(
                    flex: 1,
                    child: new Container(
                      margin: EdgeInsets.only(top: 15.0),
                      child: new Align(
                        child: new InkWell(
                          child: new Column(
                            children: <Widget>[
                              new Image.asset(
                                'assets/cate/dh.png',
                                width: 30.0,
                              ),
                              new Text('动漫')
                            ],
                          ),
                          onTap: () {
                            Navigator.of(context).push(
                                new CupertinoPageRoute(builder: (context)=>new CategoryPage(cateName:'动漫'))
                            );
                          },
                        ),
                      ),
                    )),
                new Expanded(
                  flex: 1,
                  child: new Container(
                    margin: EdgeInsets.only(top: 15.0),
                    child: new Align(
                      child: new InkWell(
                        child: new Column(
                          children: <Widget>[
                            new Image.asset(
                              'assets/cate/dszb.png',
                              width: 30.0,
                            ),
                            new Text('电视直播')
                          ],
                        ),
                        onTap: () {

//                          Navigator.of(context).push(
//                              new CupertinoPageRoute(builder: (context)=>new CategoryPage(cateName:'电视直播'))
//                          );
                        },
                      ),
                    ),
                  ),
                ),
              ],
              column: 4,
            )
          ],
        ));
  }
}
